home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 52 / Amiga Format AFCD52 (Issue 136, May 2000).iso / +system+ / afcdinstall < prev    next >
Text File  |  2000-03-01  |  19KB  |  724 lines

  1. ; $VER: AFCD_Install 2.3 (29.2.2000)
  2. ;   by Oliver Roberts (oliver.roberts@iname.com)
  3.  
  4. ;*************
  5. ; LOCALE INIT
  6. ;*************
  7.  
  8. (if (= (exists "Env:Language") 1)
  9.     (set @language (getenv "Language"))
  10. )
  11.  
  12. ;*****************
  13. ; ENGLISH STRINGS
  14. ;*****************
  15.  
  16. (set #str-yes "Yes")
  17. (set #str-no "No")
  18. (set #str-askfind "Copy AFCDFind to your hard drive?")
  19. (set #str-findno "No - I'd rather use it from the CD")
  20. (set #str-findprog "Yes - Just the program itself")
  21. (set #str-findall "Yes - The program and all the indices")
  22. (set #str-finddest "Select where the AFCDFind program files should be installed (no drawer will be created!)")
  23. (set #str-askaminet "Copy the Aminet index listing to your hard drive?\n(requires approx 5Mb disk space)")
  24. (set #str-copyaminetindex "Copying Aminet index file")
  25. (set #str-settooltypes "Setting tooltypes")
  26. (set #str-updating "Updating %s")
  27. (set #str-updateinstaller "Checking to see whether Installer should be updated")
  28. (set #str-updateview "Checking to see whether AFCDView needs to be copied to C: (i.e. if it's not there already or you have an old version")
  29. (set #str-notoncd "Set the NOTONCD tooltype?\n(see help for info)")
  30. (set #str-indexdir "Select where the AFCD index files should be installed")
  31. (set #str-arexxdest "Select where the AFCDFind ARexx script should be installed (required for full functionality)")
  32. (set #str-aminetdest "Select where the Aminet index file should be installed")
  33. (set #str-complete (cat
  34.     "Installation of your chosen files has now been completed\n\n"
  35.     "The choices that you have made will be saved and will be used "
  36.     "as the defaults when you next run this installer"
  37. ))
  38. (set #str-installmode (cat
  39.     "Do you wish to view/change your existing settings or just update "
  40.     "the files using your current settings?"
  41. ))
  42. (set #str-modenew "Change these settings")
  43. (set #str-modeview "View settings")
  44. (set #str-modeupdate "Update files")
  45. (set #str-copyafbase "Copying AFBase files")
  46. (set #str-askafbase "Copy AFBase to your hard drive?")
  47. (set #str-afbaseno "No - I'd rather use it from the CD")
  48. (set #str-afbaseyes "Yes")
  49. (set #str-afbasedest "Select where the AFBase should be installed (no drawer will be created!)")
  50. (set #str-askmuibase (cat
  51.     "AFBase will require MUIbase to be installed on your drive.  Should "
  52.     "I run the MUIbase installer for you?"
  53. ))
  54. (set #str-muibaseno "No - I'll install it later")
  55. (set #str-muibaseyes "Yes")
  56. (set #str-muibasecancel "I've changed my mind - don't install AFBase!")
  57. (set #str-muibaselaunch "Launching MUIbase installer...")
  58. (set #str-muibasefail (cat
  59.     "Unable to launch MUIbase installer - you will need to run the installer "
  60.     "manually from +System+/Tools/Workbench/MUIbase)"
  61. ))
  62. (set #str-copyunpackers "Copying archive unpackers")
  63. (set #str-askunpackers "Copy LhA, LZX and/or UnZip (archive unpackers) to your hard drive?")
  64. (set #str-unpackersdest "Select directory where the unpackers should be copied to")
  65. (set #str-currentabove "Your current settings are shown above")
  66. (set #str-modeview "View current settings")
  67. (set #str-modecurrent "Change current settings")
  68. (set #str-viewset "Viewing settings via external viewer - close to continue")
  69. (set #str-os35 "Upgrade to AmigaOS 3.5 for optimum functionality!")
  70. (set #str-finddocdest "Select where the AFCDFind help file should be installed")
  71.  
  72. (set #help-updateinstaller (cat
  73.     "This installer script will automatically update your copy of Installer "
  74.     "if you are using an older version"
  75. ))
  76. (set #help-updateview (cat
  77.     "This installer script will automatically update your copy of AFCDView "
  78.     "which is required to view files on this CD via the AFCDPrefs system"
  79. ))
  80. (set #help-find (cat
  81.     "Although AFCDFind works just fine from the CD, you may wish to "
  82.     "install it on your hard drive.  If so, then there are two different "
  83.     "variations to choose from:\n\n"
  84.     "1. Just the AFCDFind program files will be copied to your hard "
  85.     "drive.  You could then create a \"left out\" icon via Workbench "
  86.     "so you can easily access AFCDFind from Workbench.  However, for "
  87.     "this to work, you'll still need an AFCD in your drive.\n\n"
  88.     "2. In addition to copying all the AFCDFind program files to your "
  89.     "hard drive, you can choose to copy all the CD index files too.  "
  90.     "This may be faster, and it also means that you can use AFCDFind "
  91.     "even if there is no AFCD in your CD drive.  However, you'll need "
  92.     "to have quite a bit of spare space to use this option (30Mb+ at "
  93.     "the time of writing!\n\n"
  94. ))
  95. (set #help-notoncd (cat
  96.     "Currently, setting this tooltype just changes the text in the Search "
  97.     "cycle gadget.  Normally, there will be \"This CD\" and \"Last 5 CDs\" options. "
  98.     "If you specify this tooltype, these will be replaced with the actual CD "
  99.     "numbers. You may prefer this when running AFCDFind off your hard drive "
  100.     "instead of the CD.\n\n"
  101. ))
  102. (set #help-afbase (cat
  103.     "You will be able to use AFBase without problems directly from the CD. "
  104.     "However, access to database records could be slow depending on the "
  105.     "speed of your CD-ROM drive. Therefore, you may want to consider "
  106.     "installing AFBase to your hard drive for extra speed.\n\n"
  107.     "Note: AFBase uses Steffen Gutmann's MUIbase software - if you want "
  108.     "to install AFBase, MUIbase will need to be present on your hard drive. "
  109.     "If this installer can't find it, it'll ask you whether you want to "
  110.     "install it or not (MUIbase can be found in +System+/Tools/WB)."
  111. ))
  112.  
  113. ;************
  114. ; PROCEDURES
  115. ;************
  116.  
  117. (procedure P_SaveChoices
  118.     (textfile
  119.         (dest "ENV:AFCD_Install")
  120.         (append
  121.             (cat
  122.                 ("FINDINSTALL=%ld\n" #findinstall)
  123.                 ("FINDDIR=%s\n" #finddir)
  124.                 ("AMINETINSTALL=%ld\n" #aminetinstall)
  125.                 ("AMINETDIR=%s\n" #aminetdir)
  126.                 ("FINDDOPUS=%ld\n" #find-dopus)
  127.                 ("AFBASEINSTALL=%ld\n" #afbaseinstall)
  128.                 ("AFBASEDIR=%s\n" #afbasedir)
  129.                 ("UNPACKINSTALL=%ld\n" #unpackersinstall)
  130.                 ("UNPACKDIR=%s\n" #unpackersdir)
  131.             )
  132.         )
  133.         (safe)
  134.     )
  135.     (copyfiles
  136.         (source "ENV:AFCD_Install")
  137.         (dest "ENVARC:")
  138.         (nogauge)
  139.         (safe)
  140.     )
  141. )
  142.  
  143. (procedure P_ReadFindTooltypes
  144.     (set #indexdir (tackon #finddir "AFCD_Indices"))
  145.     (set #matchscript (tackon #finddir "AFCDFind-HandleMatch.rexx"))
  146.     (set #finddocdir #finddir)
  147.     (if (AND (exists (tackon #finddir "AFCDFind.info")) (>= @installer-version 2752524))
  148.         (
  149.             (set #find-notoncd "off")
  150.             (iconinfo
  151.                 (dest (tackon #finddir "AFCDFind"))
  152.                 (gettooltype "NOTONCD" "#find-notoncd")
  153.                 (gettooltype "INDEXDIR" "#indexdir")
  154.                 (gettooltype "MATCHSCRIPT" "#matchscript")
  155.                 (gettooltype "HELPFILE" "#helpfile")
  156.                 (safe)
  157.             )
  158.             (set #finddocdir (pathonly #helpfile))
  159.         )
  160.     )
  161.     (set #find-notoncd (<> "off" #find-notoncd))
  162.     (if (= #indexdir (cat #cddevice ":+System+/Indices"))
  163.         (set #indexdir (tackon #finddir "AFCD_Indices"))
  164.     )
  165. )
  166.  
  167. (set #str-sep "------------------------------------------------------------------------------------------\n")
  168.  
  169. (procedure P_GetViewSettingsString
  170.     (cat
  171.         ("1. Install AFCDFind?\n\n   %s\n" (select #findinstall #str-findno #str-findprog #str-findall))
  172.         (if (> #findinstall 0) ("   Destination:   %s\n" #finddir))
  173.         (if (> #findinstall 0) ("   Help file dir:   %s\n" #finddocdir))
  174.         (if (> #findinstall 1) ("   Index dir:   %s\n" #indexdir))
  175.         ("   NOTONCD tooltype:   %s\n" (if #find-notoncd "Set" "Unset"))
  176.         ("   ARexx script:   %s\n" #matchscript)
  177.         (#str-sep)
  178.         ("2. Install AFBase?\n\n   %s\n" (if #afbaseinstall #str-yes #str-no))
  179.         (if (> #afbaseinstall 0) ("   Destination:   %s\n" #afbasedir))
  180.         (#str-sep)
  181.         ("3. Install Aminet Index?\n\n   %s\n" (if #aminetinstall #str-yes #str-no))
  182.         (if (> #aminetinstall 0) ("   Destination:   %s\n" #aminetdir))
  183.         (#str-sep)
  184.         ("4. Install Unpackers?\n\n   %s\n" (if #unpackersinstall #str-yes #str-no))
  185.         (if (> #unpackersinstall 0) ("   Destination:   %s\n" #unpackersdir))
  186.         (#str-sep)
  187.     )
  188. )
  189.  
  190. ;******
  191. ; INIT
  192. ;******
  193.  
  194. (if (= "AFCD" (substr (expandpath ":") 0 4))
  195.     ; started from an AFCD
  196.     (set #cddevice (getdevice ":"))
  197.     ; not started from an AFCD (for testing purposes)
  198.     (set #cddevice "CD0")
  199. )
  200.  
  201. (set #maxcfglines 15)
  202.  
  203. (set #finddir @default-dest)
  204. (set #aminetdir @default-dest)
  205. (set #findinstall 0)
  206. (set #aminetinstall 0)
  207. (set #find-notoncd 1)
  208. (set #afbaseinstall 0)
  209. (set #muibaseinstall 0)
  210. (set #afbasedir @default-dest)
  211. (set #unpackersinstall 0)
  212. (set #unpackersdir "C:")
  213.  
  214. (set #configexists (exists "ENV:AFCD_Install" (noreq)))
  215.  
  216. (delete "ENV:AFCDCfg.line" (safe))
  217. (set #ln 1)
  218. (if #configexists
  219.     (while (> #ln 0)
  220.         (run ("C/GetCfgLine ENV:AFCD_Install ENV:AFCDCfg.line %ld" #ln) (safe))
  221.         (set #line (getenv "AFCDCfg.line"))
  222.         (delete "ENV:AFCDCfg.line" (safe))
  223.         (set #linelen (strlen #line))
  224.         (if (AND (> (strlen #line) 0) (< #ln #maxcfglines))
  225.             (
  226.                 (set #i 0)
  227.                 (while (AND (<> (substr #line #i 1) "=") (< #i #linelen))
  228.                     (set #i (+ #i 1))
  229.                 )
  230.                 (if (= (substr #line #i 1) "=")
  231.                     (
  232.                         (set #var (substr #line 0 #i))
  233.                         (set #i (+ #i 1))
  234.                         (set #k #i)
  235.                         (while (<> (substr #line #i 1) "\n")
  236.                             (set #i (+ #i 1))
  237.                         )
  238.                         (if (> (- #i #k) 0)
  239.                             (
  240.                                 (set #val (substr #line #k (- #i #k)))
  241.                                 (if (= "FINDINSTALL" #var)
  242.                                     (set #findinstall (+ #val))
  243.                                 )
  244.                                 (if (= "FINDDIR" #var)
  245.                                     (set #finddir #val)
  246.                                 )
  247.                                 (if (= "AMINETINSTALL" #var)
  248.                                     (set #aminetinstall (+ #val))
  249.                                 )
  250.                                 (if (= "AMINETDIR" #var)
  251.                                     (set #aminetdir #val)
  252.                                 )
  253.                                 (if (= "FINDDOPUS" #var)
  254.                                     (set #find-dopus (+ #val))
  255.                                 )
  256.                                 (if (= "AFBASEINSTALL" #var)
  257.                                     (set #afbaseinstall (+ #val))
  258.                                 )
  259.                                 (if (= "AFBASEDIR" #var)
  260.                                     (set #afbasedir #val)
  261.                                 )
  262.                                 (if (= "UNPACKINSTALL" #var)
  263.                                     (set #unpackersinstall (+ #val))
  264.                                 )
  265.                                 (if (= "UNPACKDIR" #var)
  266.                                     (set #unpackersdir #val)
  267.                                 )
  268.                             )
  269.                         )
  270.                     )
  271.                 )
  272.                 (set #ln (+ #ln 1))
  273.             )
  274.             ; else
  275.             (set #ln 0)
  276.         )
  277.     )
  278. )
  279.  
  280. ; ALWAYS ON!
  281. (set #find-dopus 1)
  282.  
  283. ;*******************
  284. ; INTERACTIVE START
  285. ;*******************
  286.  
  287. (welcome)
  288.  
  289. (if #configexists
  290.     (if (>= (/ @installer-version 65536) 44)
  291.         (
  292.             (P_ReadFindTooltypes)
  293.             (textfile
  294.                 (dest "T:Current Install Settings")
  295.                 (append (P_GetViewSettingsString))
  296.                 (safe)
  297.             )
  298.                     (showmedia "#settingstxt" "T:Current Install Settings" "upper_center" "small" 1)
  299.             (set #interactive
  300.                 (askchoice
  301.                     (prompt #str-currentabove)
  302.                     (help @askchoice-help)
  303.                     (choices (cat (if (< @installer-version 2752518) "" "\x1b[2p") #str-modenew) #str-modeupdate)
  304.                     (default 1)
  305.                 )
  306.             )
  307.             (closemedia #settingstxt)
  308.             (delete "T:Current Install Settings" (safe))
  309.         )
  310.         ; else
  311.         (
  312.             (P_ReadFindTooltypes)
  313.             (textfile
  314.                 (dest "T:Current Install Settings")
  315.                 (append (P_GetViewSettingsString))
  316.                 (safe)
  317.             )
  318.             (set #choice 0)
  319.             (while (= #choice 0)
  320.                 (set #choice
  321.                     (askchoice
  322.                         (prompt #str-os35)
  323.                         (help @askchoice-help)
  324.                         (choices (cat (if (< @installer-version 2752518) "" "\x1b[2p") #str-modeview) #str-modecurrent #str-modeupdate)
  325.                         (default #choice)
  326.                     )
  327.                 )
  328.                 (if (= #choice 0)
  329.                     (
  330.                         (working #str-viewset)
  331.                         (run "C:AFCDView \"T:Current Install Settings\"" (safe))
  332.                     )
  333.                 )
  334.             )
  335.             (set #interactive (- #choice 1))
  336.             (delete "T:Current Install Settings" (safe))
  337.         )
  338.     )
  339.     ; else
  340.     (set #interactive 0)
  341. )
  342.  
  343. (if (= #interactive 0)
  344.     (
  345.         (set #findinstall
  346.             (askchoice
  347.                 (prompt #str-askfind)
  348.                 (help #help-find @askchoice-help)
  349.                 (choices (cat (if (< @installer-version 2752518) "" "\x1b[2p") #str-findno) #str-findprog #str-findall)
  350.                 (default #findinstall)
  351.             )
  352.         )
  353.  
  354.         (if #findinstall
  355.             (
  356.                 (set #finddir
  357.                     (askdir
  358.                         (prompt #str-finddest)
  359.                         (help @askdir-help)
  360.                         (default #finddir)
  361.                     )
  362.                 )
  363.                 (P_ReadFindTooltypes)
  364.                 (set #finddocdir
  365.                     (askdir
  366.                         (prompt #str-finddocdest)
  367.                         (help @askdir-help)
  368.                         (default #finddocdir)
  369.                     )
  370.                 )
  371.                 (if (= #findinstall 2)
  372.                     (set #indexdir
  373.                         (askdir
  374.                             (prompt #str-indexdir)
  375.                             (help @askdir-help)
  376.                             (default #indexdir)
  377.                             (newpath)
  378.                         )
  379.                     )
  380.                 )
  381.                 (set #matchscript (tackon
  382.                     (askdir
  383.                         (prompt #str-arexxdest)
  384.                         (help @askdir-help)
  385.                         (default #matchscript)
  386.                     )
  387.                     "AFCDFind-HandleMatch.rexx")
  388.                 )
  389.                 (set #find-notoncd
  390.                     (askchoice
  391.                         (prompt #str-notoncd)
  392.                         (help #help-notoncd @askchoice-help)
  393.                         (choices (cat (if (< @installer-version 2752518) "" "\x1b[2p") #str-no) #str-yes)
  394.                         (default #find-notoncd)
  395.                     )
  396.                 )
  397.             )
  398.         )
  399.  
  400.         (set #afbaseinstall
  401.             (askchoice
  402.                 (prompt #str-askafbase)
  403.                 (help #help-afbase @askchoice-help)
  404.                 (choices (cat (if (< @installer-version 2752518) "" "\x1b[2p") #str-afbaseno) #str-afbaseyes)
  405.                 (default #afbaseinstall)
  406.             )
  407.         )
  408.  
  409.         (if #afbaseinstall
  410.             (set #afbasedir
  411.                 (askdir
  412.                     (prompt #str-afbasedest)
  413.                     (help @askdir-help)
  414.                     (default #afbasedir)
  415.                 )
  416.             )
  417.         )
  418.  
  419.         (set #aminetinstall
  420.             (askchoice
  421.                 (prompt #str-askaminet)
  422.                 (help @askchoice-help)
  423.                 (choices (cat (if (< @installer-version 2752518) "" "\x1b[2p") #str-no) #str-yes)
  424.                 (default #aminetinstall)
  425.             )
  426.         )
  427.  
  428.         (if #aminetinstall
  429.             (set #aminetdir
  430.                 (askdir
  431.                     (prompt #str-aminetdest)
  432.                     (help @askdir-help)
  433.                     (default #aminetdir)
  434.                 )
  435.             )
  436.         )
  437.  
  438.         (set #unpackersinstall
  439.             (askchoice
  440.                 (prompt #str-askunpackers)
  441.                 (help @askchoice-help)
  442.                 (choices (cat (if (< @installer-version 2752518) "" "\x1b[2p") #str-no) #str-yes)
  443.                 (default #unpackersinstall)
  444.             )
  445.         )
  446.  
  447.         (if #unpackersinstall
  448.             (set #unpackersdir
  449.                 (askdir
  450.                     (prompt #str-unpackersdest)
  451.                     (help @askdir-help)
  452.                     (default #unpackersdir)
  453.                 )
  454.             )
  455.         )
  456.     )
  457.     ; else
  458.     (
  459.         (P_ReadFindTooltypes)
  460.     )
  461. )
  462.  
  463. (if #afbaseinstall
  464.     (if (= (getassign "MUIbase") "")
  465.         (
  466.             (set #muibaseinstall
  467.                 (askchoice
  468.                     (prompt #str-askmuibase)
  469.                     (help #help-afbase @askchoice-help)
  470.                     (choices (cat (if (< @installer-version 2752518) "" "\x1b[2p") #str-muibaseno) #str-muibaseyes #str-muibasecancel)
  471.                     (default #muibaseinstall)
  472.                 )
  473.             )
  474.             (if (= #muibaseinstall 2)
  475.                 (
  476.                     (set #afbaseinstall 0)
  477.                     (set #muibaseinstall 0)
  478.                 )
  479.             )
  480.         )
  481.     )
  482. )
  483.  
  484. ;*******************
  485. ; COPY FILES ACROSS
  486. ;*******************
  487.  
  488. (onerror (P_SaveChoices))
  489.  
  490. (complete 0)
  491.  
  492. (working #str-updateinstaller)
  493.  
  494. (if (= 0 (run "C:Which Installer NORES >ENV:AFCDInst_tmp" (safe)))
  495.     (
  496.         (set #installerloc (getenv "AFCDInst_tmp"))
  497.         (set #installerloc (substr #installerloc 0 (- (strlen #installerloc) 1)))
  498.     )
  499.     ;else
  500.     (set #installerloc "C:")
  501. )
  502.  
  503. (set #skipinstaller 0)
  504. (set #installerfn (tackon #installerloc "Installer"))
  505. (if (exists #installerfn)
  506.     (if (= 0 (run ("C:Version %s >ENV:AFCDInst_tmp" #installerfn) (safe)))
  507.         (
  508.             (set #verstring (getenv "AFCDInst_tmp"))
  509.             (if (= "InstallerNG" (substr #verstring 0 11))
  510.                 (set #skipinstaller 1)
  511.             )
  512.         )
  513.     )
  514. )
  515.  
  516. (if (= #skipinstaller 0)
  517.     (copylib
  518.         (prompt (#str-updating #installerloc))
  519.         (help #help-updateinstaller)
  520.         (source (cat #cddevice ":+System+/C/Installer"))
  521.         (dest (pathonly #installerloc))
  522.         (optional nofail)
  523.         (confirm)
  524.     )
  525. )
  526.  
  527. (delete "ENV:AFCDInst_tmp" (safe))
  528.  
  529. (complete 8)
  530.  
  531. (working #str-updateview)
  532.  
  533. (copylib
  534.     (prompt (#str-updating "C:AFCDView"))
  535.     (help #help-updateview)
  536.     (source (cat #cddevice ":+System+/C/AFCDView"))
  537.     (dest "C:")
  538.     (optional nofail)
  539.     (confirm)
  540. )
  541.  
  542. (complete 10)
  543.  
  544. (if #findinstall
  545.     (
  546.         (copylib
  547.             (source (cat #cddevice ":+System+/Find"))
  548.             (dest #finddir)
  549.             (newname "AFCDFind")
  550.         )
  551.         (if (NOT (exists (tackon #finddir "AFCDFind.info")))
  552.             (
  553.                 (copyfiles
  554.                     (source (cat #cddevice ":+System+/Find.info"))
  555.                     (dest #finddir)
  556.                     (newname "AFCDFind.info")
  557.                 )
  558.                 (tooltype
  559.                     (prompt #str-settooltypes)
  560.                     (dest (tackon #finddir "AFCDFind"))
  561.                     (noposition)
  562.                 )
  563.             )
  564.         )
  565.         ; clear tooltypes first (bug in installer)
  566.         (tooltype
  567.             (prompt #str-settooltypes)
  568.             (dest (tackon #finddir "AFCDFind"))
  569.             (settooltype "NOTONCD")
  570.             (settooltype "(NOTONCD)")
  571.             (settooltype "FASTSTARTUP")
  572.             (settooltype "(FASTSTARTUP)")
  573.             (settooltype "HELPFILE")
  574.             (settooltype "(HELPFILE")
  575.             (settooltype "MATCHSCRIPT")
  576.             (settooltype "(MATCHSCRIPT")
  577.             (settooltype "INDEXDIR")
  578.             (settooltype "(INDEXDIR")
  579.         )
  580.         ; now set tooltypes
  581.         (tooltype
  582.             (prompt #str-settooltypes)
  583.             (dest (tackon #finddir "AFCDFind"))
  584.             (if (= 1 #find-notoncd) (settooltype "NOTONCD" "") (settooltype "(NOTONCD)" ""))
  585.             (settooltype (if (= 2 #findinstall) "(FASTSTARTUP)" "FASTSTARTUP") "")
  586.             (settooltype "HELPFILE" (tackon #finddocdir "AFCDFind.guide"))
  587.             (settooltype "MATCHSCRIPT" #matchscript)
  588.             (settooltype "INDEXDIR" (if (= #findinstall 2) #indexdir (cat #cddevice ":+System+/Indices")))
  589.         )
  590.         (if (exists (cat #cddevice ":+System+/Info/AFCDFind.guide"))
  591.             (copyfiles
  592.                 (source (cat #cddevice ":+System+/Info/AFCDFind.guide"))
  593.                 (dest #finddocdir)
  594.                 (infos)
  595.             )
  596.         )
  597.         (copyfiles
  598.             (source (cat #cddevice ":+System+/AFCDFind-HandleMatch.rexx"))
  599.             (dest (pathonly #matchscript))
  600.             (infos)
  601.         )
  602.     )
  603. )
  604.  
  605. (complete 20)
  606.  
  607. (if (= #findinstall 2)
  608.     (
  609.         (if (NOT (exists #indexdir))
  610.             (makedir #indexdir (infos))
  611.         )
  612.         (foreach (cat #cddevice ":+System+/Indices") "(AFCD?|AFCD??)"
  613.             (if (< @each-type 0)
  614.                 (
  615.                     (set #docopyidx 1)
  616.                     (set #idxname (cat #cddevice ":+System+/Indices/" @each-name))
  617.                     (if (exists (tackon #indexdir @each-name))
  618.                         (if (NOT (earlier (tackon #indexdir @each-name) #idxname))
  619.                             (set #docopyidx 0)
  620.                         )
  621.                     )
  622.                     (if #docopyidx
  623.                         (copyfiles
  624.                             (source #idxname)
  625.                             (dest #indexdir)
  626.                             (infos)
  627.                         )
  628.                     )
  629.                 )
  630.             )
  631.         )
  632.     )
  633. )
  634.  
  635. (complete 70)
  636.  
  637. (if #afbaseinstall
  638.     (
  639.         (copyfiles
  640.             (prompt #str-copyafbase)
  641.             (help @copyfiles-help)
  642.             (source (cat #cddevice ":+System+/Info/AFBase"))
  643.             (dest #afbasedir)
  644.             (infos)
  645.             (optional nofail force)
  646.             (confirm)
  647.         )
  648.         (set #datadir (tackon #afbasedir "AFBase_data"))
  649.         (if (NOT (exists #datadir))
  650.             (makedir #datadir)
  651.         )
  652.         (copyfiles
  653.             (prompt #str-copyafbase)
  654.             (help @copyfiles-help)
  655.             (source (cat #cddevice ":+System+/Info/AFBase_data"))
  656.             (dest #datadir)
  657.             (all)
  658.             (infos)
  659.             (optional nofail force)
  660.             (confirm)
  661.         )
  662.     )
  663. )
  664.  
  665. (complete 80)
  666.  
  667. (if #aminetinstall
  668.     (copyfiles
  669.         (prompt #str-copyaminetindex)
  670.         (help @copyfiles-help)
  671.         (source (cat #cddevice ":-In_the_Mag-/Reader_Requests/Aminet_Index"))
  672.         (dest #aminetdir)
  673.         (infos)
  674.         (noposition)
  675.         (optional nofail askuser)
  676.         (confirm)
  677.     )
  678. )
  679.  
  680. (complete 90)
  681.  
  682. (if #unpackersinstall
  683.     (copyfiles
  684.         (prompt #str-copyunpackers)
  685.         (help @copyfiles-help)
  686.         (source (cat #cddevice "C"))
  687.         (choices "LhA" "LZX" "UnZip")
  688.         (dest #unpackersdir)
  689.         (optional nofail askuser)
  690.         (confirm)
  691.     )
  692. )
  693.  
  694. (if #muibaseinstall
  695.     (
  696.         (set #mbdir (tackon #cddevice "+System+/Tools/Workbench/MUIbase"))
  697.         (set #error (run ("cd %s\x0arun <>NIL: :+System+/C/Installer \"%s\" APPNAME \"MUIbase V1.2\" DEFUSER AVERAGE LOGFILE t:MUIbase_install.log" #mbdir "Install-MUIbase")
  698.                 (prompt #str-muibaselaunch)
  699.                 (help "")
  700.                 (confirm)
  701.             )
  702.         )
  703.         (if (<> #error 0)
  704.             (message #str-muibasefail)
  705.         )
  706.     )
  707. )
  708.  
  709. ;**************
  710. ; SAVE CHOICES
  711. ;**************
  712.  
  713. (complete 99)
  714.  
  715. (P_SaveChoices)
  716.  
  717. ;*********
  718. ; THE END
  719. ;*********
  720.  
  721. (complete 100)
  722.  
  723. (exit #str-complete (quiet))
  724.